Face recognition method and electronic device employing the method

ABSTRACT

A method for recognizing, identifying, and authenticating persons to be identified from their faces in a preset scenario, includes uploading a first image of users to a server, and receiving the first image on which first facial rectangles and user information have been imposed, and capturing a second image and detecting second facial rectangles therefrom. The method determines whether a number of faces of the second image is equal to a number of faces of the first image, and uploading the second image to the server for identifying third facial rectangles of the second image. A plurality of distances is obtained by calculating at least one distance between third and second facial rectangles of each user shown in the second image and determining whether the users shown in the second image are the same as users shown in the first image based on the plurality of distances.

FIELD

The subject matter herein generally relates to face recognitiontechnology.

BACKGROUND

Image recognition is more and more widely used. For example, face imagerecognition is applied to access control systems, attendance systems,point-of-sale systems, and conference room systems. However, theapplication of the technology is not done with optimal efficiency.

BRIEF DESCRIPTION OF THE DRAWINGS

Many aspects of the disclosure can be better understood with referenceto the following drawings. The components in the drawings are notnecessarily drawn to scale, the emphasis instead being placed uponclearly illustrating the principles of the disclosure. Moreover, in thedrawings, like reference numerals designate corresponding partsthroughout the several views.

FIG. 1 is a block diagram of one embodiment of an electronic device.

FIG. 2 illustrates a schematic diagram of the detection of a face of asecond user image by using a concatenated convolutional neural networkalgorithm.

FIG. 3 illustrates a schematic diagram of facial rectangles applied tosecond user image.

FIG. 4 illustrates a flowchart of one embodiment of a face recognitionmethod applied in the electronic device of FIG. 1.

DETAILED DESCRIPTION

It will be appreciated that for simplicity and clarity of illustration,where appropriate, reference numerals have been repeated among thedifferent figures to indicate corresponding or analogous elements. Inaddition, numerous specific details are set forth in order to provide athorough understanding of the embodiments described herein. However, itwill be understood by those of ordinary skill in the art that theembodiments described herein can be practiced without these specificdetails. In other instances, methods, procedures, and components havenot been described in detail so as not to obscure the related relevantfeature being described. Also, the description is not to be consideredas limiting the scope of the embodiments described herein. The drawingsare not necessarily to scale and the proportions of certain parts may beexaggerated to better illustrate details and features of the presentdisclosure.

The present disclosure, including the accompanying drawings, isillustrated by way of examples and not by way of limitation. It shouldbe noted that references to “an” or “one” embodiment in this disclosureare not necessarily to the same embodiment, and such references mean “atleast one.”

The term “module”, as used herein, refers to logic embodied in hardwareor firmware, or to a collection of software instructions, written in aprogramming language, such as, Java, C, or assembly. One or moresoftware instructions in the modules can be embedded in firmware, suchas in an EPROM. The modules described herein can be implemented aseither software and/or hardware modules and can be stored in any type ofnon-transitory computer-readable medium or other storage device. Somenon-limiting examples of non-transitory computer-readable media includeCDs, DVDs, BLU-RAY™, flash memory, and hard disk drives. The term“comprises” means “including, but not necessarily limited to”; itspecifically indicates open-ended inclusion or membership in aso-described combination, group, series, and the like.

FIG. 1 shows one embodiment of an electronic device (electronic device1). In at least one embodiment, the electronic device 1 is communicatingwith a server 2. The electronic device 1 can capture an image of a userand identify user based on the captured image and image recognitionservice provided by the server 2. The electronic device 1 can be a smartphone or a personal computer. The server 2 can be a single server, acloud server, or a server cluster providing image recognition services.

In at least one embodiment, the electronic device 1 can include, but isnot limited to, at least one processor 10, a storage device 20, an imagecapturing device 30, and a display device 40. The storage device 20, atleast one processor 10, and the first communication device 30communicate with each other through a system bus.

In at least one embodiment, the storage device 20 can be an internalstorage device, such as a flash memory, a random access memory (RAM) fortemporary storage of parameters, and/or a read-only memory (ROM) forpermanent storage of parameters. The storage device 20 can also be anexternal storage device, such as an external hard disk, a storage card,or a data storage medium. The at least one processor 10 can be a centralprocessing unit (CPU), a microprocessor, or other data processor chipthat performs functions of the electronic device 1.

In at least one embodiment, the image capturing device 30 is a camerabuilt into the electronic device 1. In other embodiments, the imagecapturing device 30 is a separate camera, which is connected with theelectronic device 1. For example, the image capturing device 30 isconnected with the electronic device 1 by a universal serial bus (USB)cable or wirelessly.

In at least one embodiment, the display device 40 is a liquid crystaldisplay (LCD) device or an organic light-emitting diode (OLED) displaydevice.

In at least one embodiment, the server 2 can include, but not limitedto, a face image database 201, and an application programming interface(API) 202. The electronic device 1 is wirelessly connected to the server2 via the Internet or WI-FI.

In at least one embodiment, the processor 10 as shown in FIG. 1 caninclude, but is not limited to, a photographing module 101, an uploadingmodule 102, a receiving module 103, a detecting module 104, adetermining module 105, a confirming module 106, and a displaying module107. The modules 101-107 can comprise computerized instructions in theform of one or more computer-readable programs that can be stored in anon-transitory computer-readable medium, for example in the storagedevice 20, and executed by the processor 10 of the electronic device 1.

In at least one embodiment, the photographing module 101 can control theimage capturing device 30 to capture images at intervals. The person tobe identified (identifiable user, or user) is in front of the electronicdevice 1. For example, the interval is five minutes. In otherembodiments, the interval can be set to other time according torequirements.

In at least one embodiment, the electronic device 1 can be used in apreset scenario. The preset scenario can be one needing continuousidentification of one or more users. For example, the preset scenariocan be a video conference. Then, using the electronic device 1 canprevent an unauthorized user from getting information about the videoconference.

In at least one embodiment, the image capturing device 30 is mountedabove the display device 40. Then, the image capturing device 30 cancapture face of the user.

In at least one embodiment, the uploading module 102 can upload a firstuser image to the server 2. It should be noted that the image capturingdevice 30 captures the first user image when the user enters or connectsto the preset scenario.

In at least one embodiment, the electronic device 1 uses a facerecognition program, and the face recognition program can upload images.An administrator or user can upload the first user image to the server 2through the face recognition program. The electronic device 1 also canupload the first user image to the server 2 through the face recognitionprogram automatically. The server 2 can receive the first user image orimages, and display first facial rectangles on the users and userinformation based on the first user image.

In at least one embodiment, the receiving module 103 can receive thefirst user image which is sent by the server 2. The first user image caninclude the first facial rectangles and user information.

In at least one embodiment, the face database 201 can store at least oneuser image and corresponding user information. An administrator of thepreset scenario can upload the at least one user image to the server 2.The at least one user image can include identity and information of theuser. The user image and information can used to identify and verify theuser.

In at least one embodiment, the application programming interface 202can identify face in first user image through a machine learningalgorithm. The application programming interface 202 can display theface by the first facial rectangles. The server 2 can analyze facialfeatures of the first user image by the application programminginterface 202. The server 2 can further compare the facial features ofthe first user image with facial features of each user image stored inthe face database 201, and obtain similarities between the facialfeatures of the first user image and facial features of each user imagestored in the face database 201. When the similarities are greater thanor equal to a predetermined percentage, the server 2 can determine thatan identified user is shown in the first user image. The information asto users can include name, sex, and age of the user. For example, thepredetermined percentage is 90%.

In at least one embodiment, the server 2 can further send the first userimage to the electronic device 1. The first user image can include thedisplayed first facial rectangles and user information. In at least oneembodiment, the server 2 can send a prompt to a user of the first userimage that authentication to the electronic device 1 has not issued,when the similarities are less than the predetermined percentage. Thatis, the receiving module 103 can receive the prompt that the user of thefirst user image is not authenticated.

In at least one embodiment, the detecting module 104 can detect secondfacial rectangles of a second user image. The second user image can beany image that the image capturing device 30 captures after the firstuser image is captured.

In at least one embodiment, the detecting module 104 can detect thefaces of the second user image by a multi-task cascaded convolutionalnetworks algorithm.

Refer to FIG. 2, the detecting module 104 can scale the second userimage to a different size to generate an image pyramid of the seconduser image. The detecting module 104 can perform three stages ofprocessing on the second user image. The three stages of processing caninclude first, second, and third stages. The first stage can use aproposal network (P-Net) to process the second user image and outputcandidate facial rectangles. In the first stage, the detecting module104 can generate candidate facial rectangles of faces of the second userimage and bounding box regression vectors by a full convolutionalnetwork based on the second user image. The detecting module 104 cancorrect the candidate facial rectangles by a bounding box regressionalgorithm. The detecting module 104 can further combine overlappingcandidate facial rectangles by a non-maximum suppression algorithm.

In at least one embodiment, the second stage can use a refine network(R-Net) to process the second user image. In the second stage, thedetecting module 104 can delete wrong facial rectangles by inputting thecandidate facial rectangles to the refine network. The detecting module104 can further correct the remaining candidate facial rectangles by thebounding box regression algorithm, and can combine overlapping candidatefacial rectangles by the non-maximum suppression algorithm.

In at least one embodiment, the third stage can use an output network(O-Net) to process the second user image. In the third stage, thedetecting module 104 can output the processed second user image. Theprocessed second user image can include at least one second facialrectangle and facial feature dots corresponding to the second facialrectangle. In the present embodiment, there are five facial feature dotson the second facial rectangle. The five facial feature dots are locatedat positions corresponding to two eyes, nose, and mouth of the seconduser image.

In at least one embodiment, the determining module 105 can determinewhether the number of faces of the second user image is equal to thenumber of faces of the first user image.

In at least one embodiment, the determining module 105 can compare thenumber of second facial rectangles of the second user image with thenumber of first facial rectangles of the first user image to determinewhether the number of faces of the second user image is equal to thenumber of faces of the first user image. When the rectangle numbers areequal, the determining module 105 can determine that the number of facesof the second user image is equal to the number of faces of the firstuser image. When the number of second facial rectangles of the seconduser image is different from the number of first facial rectangles ofthe first user image, the determining module 105 can determine that thenumber of faces of the second user image is different from the number offaces of the first user image.

In at least one embodiment, the uploading module 102 can send the seconduser image to the server 2 if the number of faces of the second userimage is equal to the number of faces of the first user image. Theserver 2 will recognize one or more third facial rectangle of the seconduser image. The receiving module 103 can receive the second user imagewith the second facial rectangles and the third facial rectangles.

In at least one embodiment, the confirming module 106 can obtain anumber of distances by calculating distance between the third facialrectangle and the second facial rectangle of each user of the seconduser image, and determine whether each of the number of distances areless than or equal to a preset value.

In at least one embodiment, the distance between the third facialrectangle and the second facial rectangle of each user of the seconduser image can be a Euclidean distance. That is, the confirming module106 can determine whether the Euclidean distance between the thirdfacial rectangle and the second facial rectangle of each user of thesecond user image is less than or equal to the preset value.

In FIG. 3, light color frame represents the second facial rectangledetected by the detecting module 104, and dark color frame representsthe third facial rectangle recognized by the server 2. The confirmingmodule 106 can determine a number of (e.g., four) endpoints of thesecond facial rectangle, and a number of (e.g., four) endpoints of thethird facial rectangle. The confirming module 106 can select oneendpoint of the second facial rectangle, and one endpoint of the thirdfacial rectangle. The position of the endpoint of the second facialrectangle corresponds to the position of the endpoint of the thirdfacial rectangle. For example, the endpoint of the second facialrectangle may be located on upper left corner of the second facialrectangle, and the endpoint of the third facial rectangle maybe locatedon upper left corner of the third facial rectangle. The endpoint of thesecond facial rectangle maybe located on lower left corner of the secondfacial rectangle, and the endpoint of the third facial rectangle maybelocated on lower left corner of the third facial rectangle. The endpointof the second facial rectangle maybe located on upper right corner ofthe second facial rectangle, and the endpoint of the third facialrectangle maybe located on upper right corner of the third facialrectangle. The endpoint of the second facial rectangle maybe located onlower right corner of the second facial rectangle, and the endpoint ofthe third facial rectangle maybe located on lower right corner of thethird facial rectangle. The confirming module 106 can calculate therelevant distances by Euclidean distance algorithm.

In at least one embodiment, as shown in FIG. 3, the endpoint A islocated on lower right corner of the second facial rectangle andendpoint B is located on lower right corner of the third facialrectangle. A plane rectangular coordinate system XOY established in thesecond user image can be taken as an example to calculate the distancebetween the endpoint A and endpoint B. The coordinates of the endpoint Aare set as (X1, Y1), and the coordinates of the endpoint B are set as(X2, Y2). The distance d between the endpoint A and the endpoint B iscalculated by formula

d=√{square root over ((X1−X2)²+(Y1−Y2)²)}.

In at least one embodiment, the determining module 103 can determinethat the users shown in the second image are the same users shown in thefirst image when the number of distances are less than or equal to thepreset value, and may also determine that user information of the seconduser image is the same as the user information of the first user imagewhen the number of distances are less than or equal to the preset value.

In at least one embodiment, when the number of faces in different userimages taken by the electronic device 1 are the same, and the distanceof the facial rectangles is small, it is determined that the users shownin different user images are the same. Thus, the server 2 need notperform the identification and verification of the users in thedifferent user images again, which simplifies the process of useridentification, and also protects against financial loss in the casewhere the image recognition provided by the server 2 requires payment.

In at least one embodiment, the uploading module 102 can further sendthe second user image to the server 2 when the number of the faces ofthe second user image is different from the number of the faces of thefirst user image. The server 2 will recognize user information of thesecond user image, and display the user information on the second userimage. For example, as shown in FIG. 3, the server 2 may recognize andidentify Hugo in the second user image, he is 43 years old and maleaccording to his information. The server 2 has displayed his name andinformation on the second user image. The receiving module 103 canfurther receive the displayed second user image which is sent by theserver 2.

In at least one embodiment, the uploading module 102 can send the seconduser image to the server 2 when at least one Euclidean distance of thenumber of distances being greater than the preset value exists. Theserver 2 will recognize user information of the second user image, anddisplay the user information on the second user image. The receivingmodule 103 can further receive the displayed second user image which issent by the server 2.

In at least one embodiment, the displaying module 107 can display theuser image captured by the image capturing device 30, and the facialrectangles and user information on the display device 40.

In at least one embodiment, the displaying module 107 can display thesecond facial rectangle and the third facial rectangle on the displayunit 40 through an open source computer database (OpenCV). Thedisplaying module 107 can further display user information in the userimage recognized by the server 2.

In at least one embodiment, for convenience of identification, thedisplaying module 107 can control the user information corresponding toa female user of the user image to be displayed in red on the displaydevice 40, and control the user information corresponding to a male userto be displayed in blue on the display device 40.

FIG. 4 illustrates a flowchart of one embodiment of a method for facerecognition applied in the electronic device of FIG. 1. In an exampleembodiment, the method is performed by execution of computer-readablesoftware program codes or instructions by the processor 10 of theelectronic device 1.

Referring to FIG. 4, a method is provided by way of example, as thereare a variety of ways to carry out the method. The method describedbelow can be carried out using the configurations illustrated in FIG. 1,for example, and various elements of these figures are referenced inexplaining method. Each block shown in FIG. 4 represents one or moreprocesses, methods, or subroutines, carried out in the method.Furthermore, the illustrated order of blocks is illustrative only andthe order of the blocks can be changed. Additional blocks can be addedor fewer blocks can be utilized without departing from this disclosure.The example method can begin at block S101.

At block S101, the photographing module 101 can control the imagecapturing device 30 to capture a user image at intervals.

At block S102, the photographing module 101 can upload a first userimage which is captured by the image capturing device 30 of theelectronic device 1 to the server 2, and the server can identify facesof the first user image and display first facial rectangles on the facesand user information on the first user image.

At block S103, the receiving module 103 can receive the identified firstuser image which is sent by the server 2. The identified first userimage includes the first facial rectangles and the user information.

At block S104, the photographing module 101 can capture a second userimage, and the detecting module 104 can detect second facial rectanglesof the second user image.

At block S105, the determining module 105 can determine whether thenumber of faces of the second user image is equal to the number of facesof the first user image. When the number of faces of the second userimage is equal to the number of faces of the first user image, theprocess goes to block S106. When the number of faces of the second userimage is different the number of faces of the first user image, theprocess goes to block S110.

At block S106, the uploading module 102 can send the second user imageto the server 2, and the server 2 can display third facial rectangles onthe second user image and send the second user image to the electronicdevice 1. The electronic device 1 can receive the second user image anddisplay the user information on the second user image.

At block S107, the confirming module 106 can obtain a number ofdistances by calculating distance between the third facial rectangle andthe second facial rectangle of each user of the second user image.

At block S108, the confirming module 106 can determine whether aplurality of distances is less than or equal to a preset value. When theplurality of distances is less than or equal to a preset value, theprocess goes to block S109. When at least one distance being greaterthan the preset value exists, the process goes to block S110.

At block S109, the determining module 103 can determine that the usersof the second image are the same users of the first image. Moreover, theuser information of the second user image can be determined to be thesame as the user information of the first user image when the distancebetween the first facial rectangle and the second facial rectangle isless than or equal to the preset value.

At block S110, the uploading module 102 can send the second user imageto the server 2. Moreover, the server 2 will recognize user informationof the second user image and display the user information on the seconduser image.

At block S111, the receiving module 103 can receive the receive seconduser image which is send by the server 2, and display the userinformation on the second user image.

It should be emphasized that the above-described embodiments of thepresent disclosure, including any particular embodiments, are merelypossible examples of implementations, set forth for a clearunderstanding of the principles of the disclosure. Many variations andmodifications can be made to the above-described embodiment(s) of thedisclosure without departing substantially from the spirit andprinciples of the disclosure. All such modifications and variations areintended to be included within the scope of this disclosure andprotected by the following claims.

What is claimed is:
 1. An electronic device communicating with a server,the electronic device comprising: a storage device; and at least oneprocessor, wherein the storage device storing one or more programswherein when executed by the at least one processor, cause the at leastone processor to: upload a first user image captured by an imagecapturing device of the electronic device to the server for identifyingfaces of the first user image; receive the identified first user imagefrom the server, and the identified first user image comprises a firstfacial rectangle of each face of the first user image and userinformation of each face of the first user image; capture a second userimage and detect a second facial rectangle of each face of the seconduser image; determine whether a number of faces of the second user imageis equal to a number of faces of the first user image; upload the seconduser image to the server for identifying one or more third facialrectangle of each face of the second user image when the number of facesof the second user image is equal to the number of faces of the firstuser image; obtain a plurality of distances by calculating at least adistance between the third facial rectangle and the second facialrectangle of each face of the second user image; determine whether theplurality of distances is less than or equal to a preset value; anddetermine the users of the second image are the same users of the firstimage when the plurality of distances is less than or equal to thepreset value.
 2. The electronic device according to claim 1, whereinwhether the number of faces of the second user image is equal to thenumber of faces of the first user image is determined by a number of thesecond facial rectangles of the second user image and a number of thefirst facial rectangles of the first user image; the number of faces ofthe second user image is equal to the number of faces of the first userimage if the number of the second facial rectangles of the second userimage is equal to the number of the first facial rectangles of the firstuser image; and the number of faces of the second user image is notequal to the number of faces of the first user image if the number ofthe second facial rectangles of the second user image is not equal tothe number of the first facial rectangles of the first user image. 3.The electronic device according to claim 1, wherein the at least oneprocessor is further caused to: send the second user image to the serverfor identifying user information of the second user image and displayingthe user information on the second user image when the number of facesof the second user image is not equal to the number of faces of thefirst user image; and receive the second user image and display the userinformation on the second user image.
 4. The electronic device accordingto claim 1, wherein the distance between the third facial rectangle andthe second facial rectangle of each face of the second user image iscalculated by: determining a plurality of endpoints of the second facialrectangle and a plurality of endpoints of the third facial rectangle;selecting one endpoint of the second facial rectangle and one endpointof the third facial rectangle, wherein position of the selected endpointof the second facial rectangle corresponds to the position of theselected endpoint of the third facial rectangle; and calculating adistance between the selected endpoint of the second facial rectangleand the selected endpoint of the third facial rectangle by an Euclideandistance algorithm.
 5. The electronic device according to claim 1,wherein the at least one processor is further caused to: send the seconduser image to the server for identifying user information of the seconduser image and displaying the user information on the second user imagewhen at least one distance of the plurality of distances being greaterthan the preset value exists; and receive the second user image anddisplay the user information on the second user image.
 6. A facerecognizing method applicable in an electronic device, the electronicdevice communicating with a server, the method comprising: uploading afirst user image captured by an image capturing device of the electronicdevice to the server for identifying faces of the first user image;receiving the identified first user image from the server, and theidentified first user image comprises a first facial rectangle of eachface of the first user image and user information of each face of thefirst user image; capturing a second user image and detect a secondfacial rectangle of each face of the second user image; determiningwhether a number of faces of the second user image is equal to a numberof faces of the first user image; uploading the second user image to theserver for identifying one or more third facial rectangle of each faceof the second user image when the number of faces of the second userimage is equal to the number of faces of the first user image; obtaininga plurality of distances by calculating at least a distance between thethird facial rectangle and the second facial rectangle of each user ofthe second user image; determining whether the plurality of distances isless than or equal to a preset value; and determining that users of thesecond image are the same users of the first image when the plurality ofdistances is less than or equal to the preset value.
 7. The methodaccording to claim 6, wherein whether the number of faces of the seconduser image is equal to the number of faces of the first user image isdetermined by a number of the second facial rectangles of the seconduser image and a number of the first facial rectangles of the first userimage; the number of faces of the second user image is equal to thenumber of faces of the first user image if the number of the secondfacial rectangles of the second user image is equal to the number of thefirst facial rectangles of the first user image; and the number of facesof the second user image is not equal to the number of faces of thefirst user image if the number of the second facial rectangles of thesecond user image is not equal to the number of the first facialrectangles of the first user image.
 8. The method according to claim 6,wherein the method further comprises: sending the second user image tothe server for identifying user information of the second user image anddisplaying the user information on the second user image when the numberof faces of the second user image is not equal to the number of faces ofthe first user image; and receiving receive the second user image anddisplaying the user information on the second user image.
 9. The methodaccording to claim 6, wherein the distance between the third facialrectangle and the second facial rectangle of each face of the seconduser image is calculated by: determining a plurality of endpoints of thesecond facial rectangle and a plurality of endpoints of the third facialrectangle; selecting one endpoint of the second facial rectangle and oneendpoint of the third facial rectangle, wherein a position of theselected endpoint of the second facial rectangle corresponds to aposition of the selected endpoint of the third facial rectangle; andcalculating at least a distance between the selected endpoint of thesecond facial rectangle and the selected endpoint of the third facialrectangle by an Euclidean distance algorithm.
 10. The method accordingto claim 6, wherein the method further comprises: sending the seconduser image to the server for identifying user information of the seconduser image and displaying the user information on the second user imagewhen at least one distance of the plurality of distances being greaterthan the preset value exists; and receiving the second user image anddisplaying the user information on the second user image.
 11. Anon-transitory storage medium having stored thereon instructions that,when executed by a processor of an electronic device, causes theprocessor to perform a face recognition method, the electronic devicecommunicating with at least one bus, the method comprising: uploading afirst user image captured by an image capturing device of the electronicdevice to the server for identifying faces of the first user image;receiving the identified first user image from the server, and theidentified first user image comprises a first facial rectangle of eachface of the first user image and user information of each face of thefirst user image; capturing a second user image and detect a secondfacial rectangle of each face of the second user image; determiningwhether a number of faces of the second user image is equal to a numberof faces of the first user image; uploading the second user image to theserver for identifying one or more third facial rectangle of each faceof the second user image when the number of faces of the second userimage is equal to the number of faces of the first user image; obtaininga plurality of distances by calculating at least a distance between thethird facial rectangle and the second facial rectangle of each user ofthe second user image; determining whether the plurality of distances isless than or equal to a preset value; and determining that users of thesecond image are the same users of the first image when the plurality ofdistances is less than or equal to the preset value.
 12. Thenon-transitory storage medium according to claim 11, wherein whether thenumber of faces of the second user image is equal to the number of facesof the first user image is determined by a number of the second facialrectangles of the second user image and a number of the first facialrectangles of the first user image; the number of faces of the seconduser image is equal to the number of faces of the first user image ifthe number of the second facial rectangles of the second user image isequal to the number of the first facial rectangles of the first userimage; and the number of faces of the second user image is not equal tothe number of faces of the first user image if the number of the secondfacial rectangles of the second user image is not equal to the number ofthe first facial rectangles of the first user image.
 13. Thenon-transitory storage medium according to claim 12, wherein the methodfurther comprises: sending the second user image to the server foridentifying user information of the second user image and displaying theuser information on the second user image when the number of faces ofthe second user image is not equal to the number of faces of the firstuser image; and receiving receive the second user image and displayingthe user information on the second user image.
 14. The non-transitorystorage medium according to claim 11, wherein the distance between thethird facial rectangle and the second facial rectangle of each face ofthe second user image is calculated by: determining a plurality ofendpoints of the second facial rectangle and a plurality of endpoints ofthe third facial rectangle; selecting one endpoint of the second facialrectangle and one endpoint of the third facial rectangle, wherein aposition of the selected endpoint of the second facial rectanglecorresponds to a position of the selected endpoint of the third facialrectangle; and calculating at least a distance between the selectedendpoint of the second facial rectangle and the selected endpoint of thethird facial rectangle by an Euclidean distance algorithm.
 15. Thenon-transitory storage medium according to claim 11, wherein the methodfurther comprises: sending the second user image to the server foridentifying user information of the second user image and displaying theuser information on the second user image when at least one distance ofthe plurality of distances being greater than the preset value exists;and receiving the second user image and displaying the user informationon the second user image.